//
//  CenterViewContro.m
//  KMedicine
//
//  Created by 阿酷 on 16/7/6.
//  Copyright © 2016年 caomu. All rights reserved.
//

#import "CenterViewContro.h"
#import "CenterScrollView.h"
@interface CenterViewContro ()

@end

@implementation CenterViewContro


- (void)viewDidLoad{
    
    self.view.backgroundColor = [UIColor colorWithRed:0.98 green:0.98 blue:0.98 alpha:0.99];
}


- (void)viewDidLayoutSubviews{
    
    [super viewDidLayoutSubviews];
    CGFloat height = self.view.bounds.size.height;
    
    self.view.backgroundColor = [UIColor colorWithRed:0.98 green:0.98 blue:0.98 alpha:0.99];
    
    NSArray *imageURl = @[[NSURL URLWithString:@"http://img.guahao.com/portal_upload/rollingnews/1453447883150.jpg"],[NSURL URLWithString:@"http://img.guahao.com/portal_upload/mediafocus/1461826474435.jpg"],[NSURL URLWithString:@"http://img.guahao.com/portal_upload/rollingnews/1461574027543.jpg"]];
    CGFloat w = self.view.bounds.size.width;
    
    CenterScrollView *centerScrollVier = [CenterScrollView CenterScrollViewWithFrame:CGRectMake(0, 0, w,height) imageURLsGroup:imageURl];
    centerScrollVier.pageControlAliment = CenterScrollViewPageContolAlimentCenter;
    [self.view addSubview:centerScrollVier];
}
@end
